import request from '/@/utils/request';

/**
 * 实验设备管理
 * @param params 要传的参数值
 * @returns 返回接口数据
 * @method equipmentInfo 获取实验设备信息
 * @method delEquipmentInfo 删除实验设备信息
 * @method updateEquipmentInfo 更新实验设备信息
 */

export function equipmentInfo(params: number) {
	return request({
		url: `equipment?Page=${params}`,
		method: 'get',
	});
}

export function delEquipmentInfo(params: any) {
	return request({
		url: 'equipment/delete',
		method: 'delete',
		data: params,
	});
}

export function updateEquipmentInfo(params: any) {
	return request({
		url: `equipment/update/${params.id}`,
		method: 'put',
		data: params.info,
	});
}

export function getEquipmentInfo(params: any) {
	return request({
		url: `equipment?Page=${params.Page}&equipment_id=${params.equipment_id}&equipment_name=${params.equipment_name}`,
		method: 'get',
	});
}